package com.sojson.config.condition;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

import com.sojson.enums.core.EEnvironmentType;
import com.sojson.util.pay.wx.constant.WxConstant;

/**
 * 是否是正式环境
 * 
 * @author liu
 * @date 2021-04-28
 */
public class OnlineConditionPayWx implements Condition {

    /**
     * 是否开启
     */
    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return WxConstant.ENVIRONMENT == EEnvironmentType.ONLINE.getCode();
    }

}